home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Animation
/
Animation Vol.1 (Profi ROM)(1994).iso
/
pvquan15
/
pac_base.dat
< prev
next >
Wrap
Text File
|
1991-11-28
|
8KB
|
303 lines
// Persistence of Vision Raytracer
// PAC_BASE.DAT
// Based on PACMAN.DAT by Ville Saari
// Copyright (c) 1991 Ferry Island Pixelboys
{
* PvRay scene description for 'Pac Man doing his favourite job'
*
* Created: 03-Jan-91
* Updated: 05-Jan-91
*
* You will need maze.iff which is included in this package.
*
* If you do some nice modifications or additions to this file, please send
* me a copy. My Internet address is:
*
* vsaari@niksula.hut.fi
}
#include "shapes.dat"
// Following #declares are used in animation
// MAKEANIM alters them to different values
#declare lip_upper = -35.0
#declare lip_lower = +10.0
#declare pac_z = 0.0
#declare f1_z = -25
#declare f2_z = -45
#declare f3_z = -65
#declare f4_z = -85
#declare f5_z = -105
{ For 3D views, the following was used to calculate the right eye position,
to give 5 degrees convergence at (40,10,0)
For left eye:
Distance to focal point = sqrt((40+80)^2+(0+140)^2)
= 184.39
Direction focal point to eye = atan((40+80)/(0+140))
= -130.6 degrees
For right eye:
Direction focal point to eye = -130.6 + 5
= -125.6 degrees
X coordinate = 40 + cos(-125.6) * 184.39
= -67.34
Z coordinate = 0 + sin(-125.6) * 184.39
= -149.93
}
#declare eye_pos = <-80.0 35.0 -140>
// #declare eye_pos = <-67.34 35.0 -149.93> Uncomment for right eye
view_point
location eye_pos
direction <0.0 0.0 1.0>
up <0.0 1.0 0.0>
right <1.1922 0.0 0.0>
sky <0.0 1.0 0.0>
look_at <40.0 10.0 0>
end_view_point
object { The maze-textured ground }
plane <0.0 1.0 0.0> 0.0 end_plane
texture
imagemap <1.0 0.0 -1.0> iff "maze.iff"
interpolate 2.0
end_map
scale <1600.0 1600.0 1600.0>
translate <-196.0 0.0 160.0>
ambient 0.3
diffuse 0.7
reflection 0.5
end_texture
end_object
composite { And now the world famous... Ta Da! ... pac man }
object { Body }
intersection
sphere <0.0 0.0 0.0> 30.0 end_sphere
sphere <0.0 0.0 0.0> 28.0 inverse end_sphere
union
plane <0.0 1.0 0.0> 0.0 rotate <lip_upper 0.0 0.0> end_plane
plane <0.0 -1.0 0.0> 0.0 rotate <lip_lower 0.0 0.0> end_plane
end_union
sphere <0.0 0.0 -29.0> 1.5
inverse
rotate <16.0 -4.0 0.0>
end_sphere
sphere <0.0 0.0 -29.0> 1.5
inverse
rotate <16.0 4.0 0.0>
end_sphere
end_intersection
texture
colour red 0.9 green 0.8
ambient 0.3
diffuse 0.7
specular 0.5
roughness 0.1
end_texture
end_object
object { Mouth }
intersection
sphere <0.0 0.0 0.0> 28.0 end_sphere
union
plane <0.0 2.0 0.0> -2.0 rotate <lip_upper 0.0 0.0> end_plane
plane <0.0 -2.0 0.0> -2.0 rotate <lip_lower 0.0 0.0> end_plane
end_union
end_intersection
texture
ambient 0.25
diffuse 0.75
colour red 0.5
end_texture
end_object
object { Tongue }
union
sphere <3.0 0.0 -15.0> 10.0 end_sphere
sphere <-3.0 0.0 -15.0> 10.0 end_sphere
end_union
rotate <-45.0 0.0 0.0>
texture
colour red 1.0
wrinkles 0.5
scale <0.5 0.5 0.5>
ambient 0.3
diffuse 0.7
reflection 0.5
end_texture
end_object
composite { Right eye }
object
sphere <0.0 0.0 0.0> 6.0 end_sphere
texture
colour red 1.0 green 1.0 blue 1.0
ambient 0.3
diffuse 0.7
reflection 0.5
end_texture
end_object
object
sphere <0.0 0.0 -2.3> 4.0 end_sphere
texture
colour red 0.3 green 0.4 blue 0.8
ambient 0.3
diffuse 0.7
reflection 0.5
end_texture
end_object
object
sphere <0.0 0.0 -5.5> 1.0 end_sphere
texture
colour red 0.0 green 0.0 blue 0.0
ambient 0.3
diffuse 0.7
reflection 0.5
end_texture
end_object
object
quadric QSphere end_quadric
scale <9.0 2.0 9.0>
translate <0.0 8.0 6.0>
rotate <0.0 0.0 -10.0>
texture
colour red 0.0 green 0.0 blue 0.0
end_texture
end_object
rotate <-25.0 -20.0 0.0>
translate <0.0 0.0 -26.0>
rotate <25.0 20.0 0.0>
end_composite
composite { Left eye }
object
sphere <0.0 0.0 0.0> 6.0 end_sphere
texture
colour red 1.0 green 1.0 blue 1.0
ambient 0.3
diffuse 0.7
reflection 0.5
end_texture
end_object
object
sphere <0.0 0.0 -2.3> 4.0 end_sphere
texture
colour red 0.3 green 0.4 blue 0.8
ambient 0.3
diffuse 0.7
reflection 0.5
end_texture
end_object
object
sphere <0.0 0.0 -5.5> 1.0 end_sphere
texture
colour red 0.0 green 0.0 blue 0.0
ambient 0.3
diffuse 0.7
reflection 0.5
end_texture
end_object
object
quadric QSphere end_quadric
scale <9.0 2.0 9.0>
translate <-0.0 8.0 6.0>
rotate <0.0 0.0 10.0>
texture
colour red 0.0 green 0.0 blue 0.0
end_texture
end_object
rotate <-25.0 20.0 0.0>
translate <0.0 0.0 -26.0>
rotate <25.0 -20.0 0.0>
end_composite
bounded_by
sphere <0.0 0.0 -2.0> 32.0 end_sphere
end_bound
translate <0.0 32.0 pac_z>
end_composite
object { Food... }
sphere <0.0 27.0 f1_z> 4.0 end_sphere
texture
colour red 1.0 green 1.0 blue 1.0
ambient 0.3
diffuse 0.7
specular 2.0
roughness 0.01
reflection 0.6
end_texture
end_object
object { ... more food ... }
sphere <0.0 27.0 f2_z> 4.0 end_sphere
texture
colour red 1.0 green 1.0 blue 1.0
ambient 0.3
diffuse 0.7
reflection 0.5
end_texture
end_object
object { ... and even more ... }
sphere <0.0 27.0 f3_z> 4.0 end_sphere
texture
colour red 1.0 green 1.0 blue 1.0
ambient 0.3
diffuse 0.7
reflection 0.5
end_texture
end_object
object { ... uh ... yet more food ... }
sphere <0.0 27.0 f4_z> 4.0 end_sphere
texture
colour red 1.0 green 1.0 blue 1.0
ambient 0.3
diffuse 0.7
reflection 0.5
end_texture
end_object
object { ... Yuck! ... no more please! }
sphere <0.0 27.0 f5_z> 4.0 end_sphere
texture
colour red 1.0 green 1.0 blue 1.0
ambient 0.3
diffuse 0.7
reflection 0.5
end_texture
end_object
object { Click }
sphere <0.0 0.0 0.0> 2.0 end_sphere
translate <60.0 120.0 -170.0>
texture
colour red 1.0 green 1.0 blue 1.0
ambient 1.0
diffuse 0.0
end_texture
colour red 1.0 green 1.0 blue 1.0
light_source
end_object